<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Browser</title>
    <script src='https://unpkg.com/@flatten-js/core'></script>
</head>
<body>
    <svg id="stage" width="500" height="500"></svg>
<script>
    const Flatten = globalThis["@flatten-js/core"];
    const {point, circle, segment} = Flatten;

    // make some construction
    let s1 = segment(10,10,200,200);
    let s2 = segment(10,160,200,30);
    let c = circle(point(200, 110), 50);
    let ip = s1.intersect(s2);

    document.getElementById("stage").innerHTML = s1.svg() + s2.svg() + c.svg() + ip[0].svg();
</script>
</body>
</html>
